﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Pap.Data
{
    /// <summary>
    /// 
    /// </summary>
    public partial class Center : ICenter, ILookUpEntity
    {
        #region ICenter Members

        /// <summary>
        /// Gets the village list.
        /// </summary>
        public IEnumerable<IVillage> VillageList
        {
            get { return this.Villages.OfType<IVillage>(); }
        }

        /// <summary>
        /// Gets the issue places.
        /// </summary>
        IEnumerable<IIssuePlace> ICenter.IssuePlaces
        {
            get { return this.IssuePlaces.OfType<IIssuePlace>(); }
        }

        /// <summary>
        /// Gets the governorate obj.
        /// </summary>
        public IGovernorate GovernorateObj
        {
            get { return this.Governorate; }
        }

        #endregion

        #region ILookUpEntity Members

        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        /// <value>
        /// The ID.
        /// </value>
        [System.Data.Linq.Mapping.Column(Name = "CenterID", Expression = "CenterID")]
        public Guid ID
        {
            get
            {
                return CenterID;
            }
            set
            {
                CenterID = value;
            }
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        public string Name
        {
            get
            {
                return CenterName;
            }
            set
            {
                CenterName = value;
            }
        }

        #endregion
    }
}
